﻿using Microsoft.AspNetCore.SignalR;

namespace Lan.ServiceCore.Signalr
{
    public class MessageHub : Hub
    {
        public override Task OnConnectedAsync()
        {
            Clients.All.SendAsync("onlineNum", new
            {
                num = 1
            });
            return base.OnConnectedAsync();
        }

        public override Task OnDisconnectedAsync(Exception exception)
        {
            return base.OnDisconnectedAsync(exception);
        }
    }
}
